import { getAction, deleteAction, putAction, putparamsAction, postAction, httpAction } from '@/api/manage'
//  根据订单查可领物料-领料
const messReceiveMaterialApplyQueryByOrderId = (params) => getAction("/mess/messReceiveMaterialApply/queryByOrderId", params);
//  根据订单查可领物料-补料
const messRemedyMaterialApplyQueryByOrderId = (params) => getAction("/mess/messRemedyMaterialApply/queryByOrderId", params);
//  根据订单查可领物料-退料
const messReturnMaterialApplyQueryByOrderId = (params) => getAction("/mess/messReturnMaterialApply/queryByOrderId", params);
// 领用
const messReceiveMaterialApplyAdd = (params) => postAction("/mess/messReceiveMaterialApply/add", params);
// 领用单分页列表
const messReceiveMaterialApplyList = (params) => getAction("/mess/messReceiveMaterialApply/list", params);
// 领用单删除
const messReceiveMaterialDelete = (params) => deleteAction("/mess/messReceiveMaterialApply/delete", params);
// 领用单逻辑删除
const messReceiveMaterialLogicDelete = (params) => deleteAction("/mess/messReceiveMaterialApply/logicDelete", params);
// 领用单详情
const messReceiveMaterialApplyQueryById = (params) => getAction(`/mess/messReceiveMaterialApply/queryById?id=${params}`,);
// 补料单列表
const messRemedyMaterialApplyList = (params) => getAction(`/mess/messRemedyMaterialApply/list`,params);
// 申请补料
const messRemedyMaterialApplyAdd = (params) => postAction("/mess/messRemedyMaterialApply/add",params);
// 删除补料
const messRemedyMaterialApplyDelete = (params) => deleteAction("/mess/messRemedyMaterialApply/delete",params);
// 逻辑删除补料
const messRemedyMaterialApplyLogicDelete = (params) => deleteAction("/mess/messRemedyMaterialApply/logicDelete",params);
// 补料详情
const messRemedyMaterialApplyQueryById = (params) => getAction(`/mess/messRemedyMaterialApply/queryById?id=${params}`,);

export const materialRequisitionApi = {
  messReceiveMaterialLogicDelete,
  messRemedyMaterialApplyLogicDelete,
  messRemedyMaterialApplyDelete,
  messReceiveMaterialDelete,
  messRemedyMaterialApplyQueryById,
  messRemedyMaterialApplyAdd,
  messRemedyMaterialApplyQueryByOrderId,
  messRemedyMaterialApplyList,
  messReceiveMaterialApplyQueryById,
  messReceiveMaterialApplyList,
  messReceiveMaterialApplyAdd,
  messReceiveMaterialApplyQueryByOrderId,
  messReturnMaterialApplyQueryByOrderId
}



